package com.axjy.util;

import javax.servlet.http.HttpSession;

public class TLManager {
	private static ThreadLocal<HttpSession> sessionTL=new ThreadLocal<HttpSession>();

	public static HttpSession getSessionTL() {
		HttpSession _session=sessionTL.get();
		return _session;
	}

	public static void setSessionTL(HttpSession session) {
		HttpSession _session=sessionTL.get();
		if(_session==null) {
			sessionTL.set(session);
		}
	}
	
	public static void closeSessionTL() {
		HttpSession _session=sessionTL.get();
		if(_session!=null) {
			sessionTL.remove();
		}
	}
	
}
